import Vue from 'vue'
import VueRouter from 'vue-router'
import login from "../views/login.vue"
import main from "../views/main.vue"

Vue.use(VueRouter)

const routes = [{
    path: "/",
    redirect: "/main"
  },
  {
    path: "/main",
    name: "main",
    component: main,
  },
  {
    path: "/focus",
    name: "focus",
    component: () => import("../views/focus.vue"),
  },
  {
    path: "/video",
    name: "video",
    component: () => import("../views/video.vue"),
  },
  {
    path: "/personal",
    name: "personal",
    component: () => import("../views/personal.vue"),
  },
  {
    path: "/search",
    name: "search",
    component: () => import("../views/search.vue"),
  },
  {
    path: "/searchresult",
    name: "searchresult",
    component: () => import("../views/searchresult.vue"),
  },
  {
    path: "/login",
    name: "login",
    component: login
  },
  {
    path: "/enterPhone",
    name: "enterPhone",
    component: () => import("../views/enterPhone.vue"),
  },
  {
    path: "/enterCode",
    name: "enterCode",
    component: () => import("../views/enterCode.vue"),
  }
]

const router = new VueRouter({
  routes
})

export default router